﻿<%@ Page Title="" Language="C#" MasterPageFile="~/master.master" AutoEventWireup="true" CodeFile="Load_news.aspx.cs" Inherits="Load_news" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style8
        {
            width: 100%;
            height: 11px;
        }
        .style9
        {}
        .style10
        {
            width: 186px;
        }
        .style11
        {
            width: 207px;
        }
        .style12
        {
            width: 100%;
        }
        .style13
        {
            width: 91px;
        }
        .style14
        {
            width: 95px;
        }
        .style15
        {
            width: 124px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table class="style8">
        <tr>
            <td class="style9">
                <asp:Label ID="Label4" runat="server" Text="Album"></asp:Label>
            </td>
            <td class="style10">
                <asp:Label ID="Label5" runat="server" Text="Image"></asp:Label>
            </td>
            <td class="style11">
                <asp:Label ID="Label6" runat="server" Text="Title Picture"></asp:Label>
            </td>
            <td>
                <asp:Label ID="Label7" runat="server" Text="Upload date"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style9" colspan="4">
                <asp:DataList ID="DataList1" runat="server" DataKeyField="pictureId" 
                    DataSourceID="SqlDataSource1">
                    <ItemTemplate>
                        <table class="style12">
                            <tr>
                                <td class="style13">
                                    <asp:Label ID="Label8" runat="server" Text='<%# Eval("albumId") %>'></asp:Label>
                                </td>
                                <td class="style14">
                                    <asp:Image ID="Image2" runat="server" ImageUrl='<%# Eval("filePath") %>' />
                                </td>
                                <td class="style15">
                                    <asp:Label ID="Label9" runat="server" 
                                        Text='<%# Eval("uploadedDate", "{0:hh:mm:ss - dd/mm/yyyy}") %>'></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="Label10" runat="server" Text='<%# Eval("caption") %>'></asp:Label>
                                </td>
                            </tr>
                        </table>
                        <br />
                        <br />
                    </ItemTemplate>
                </asp:DataList>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                    SelectCommand="SELECT * FROM [tblPicture] WHERE ([albumId] = @albumId)">
                    <SelectParameters>
                        <asp:QueryStringParameter Name="albumId" QueryStringField="albumId" 
                            Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
    </table>
</asp:Content>

